To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
There is another way to set a MenuKey on a Japanese system. If you set the script code of the menu string in the resource to Japanese, then the menu string's locale.fScriptCode will be correct in PrivInitTextItem.
Here is how to make a Japanese menu string:
#define smJapanese 1
#define langJapanese 11
// In order to change the constants in FW_RStringData, we have to subclass it like this:
type RJStringData : FW_RStringData (ScriptCode = smJapanese, LanguageCode = langJapanese)
{
};
resource FW_RMenuBar(kMenuBar)
{
{
FW_RPullDownMenu
(
"Example"
{
FW_RTextItem(23456, 'J', RJStringData("ó·"))
}
)
}
};
Mary Boetcher
ODF Person
---
>GetScriptManagerVariable(smSysScript) in FW_CTextItem::PrivInitTextItem()
>return 1 from Japanese-System.
>And locale.fScriptCode of MenuString in FW_CTextItem::PrivInitTextItem()
>is 0.
>
>So I can not set MenuKey.
>
>Now I set 0 to SysScript before I call FW_CMenuBar::InitializeFromResource().